<%@ taglib uri="/WEB-INF/myfaces_html.tld" 	prefix="h" %>
<%@ taglib uri="/WEB-INF/myfaces_core.tld" 	prefix="f" %>
<%@ taglib uri="/WEB-INF/tomahawk.tld"     	prefix="t" %>
<%@ taglib uri="/WEB-INF/myfaces_sandbox.tld"   prefix="s" %>
<%@ page import="it.azienda.managerworkstandard.modello.BeanProdottoDett" %>
<%@ page import="java.util.ArrayList" %>

<f:view>
    <jsp:include page="/intestazione.jsp">
        <jsp:param name="titolo" value="Gestione Resi Fornitore"/>
    </jsp:include>
    <jsp:include page="/menu.jsp"/>
    <script language="javascript" src="./script/popup_full_center.js"></script>
    <script language="javascript" src="./script/confirmCM.js"></script>    
    <script language="javascript" src="./script/ripristinoSessione.js"></script>    
    <t:saveState value="#{beanPrimaNotaDb}"/>
    
    <h:form id="erroriDataBase" rendered="false">
        <f:verbatim><table><td align="left" class="messaggiErrore" height="2px"></f:verbatim>           
        <h:messages style="color: red" showDetail="true" showSummary="false"/>
        <f:verbatim></td></table></f:verbatim>
    </h:form>  
    
    <h:form binding="#{dettaglioPrimaNotaDb.form}" id="formLookup">    

        <t:panelTabbedPane serverSideTabSwitch="false">             
            <t:panelTab id="tab0" label="Dati Prima Nota (Manuale)">
            
                <f:verbatim><table class="dettaglio"></f:verbatim>
                <f:verbatim><tbody></f:verbatim>         
                
                <f:verbatim><tr>
                    <td class="etichettaDettaglio"></f:verbatim> <f:verbatim> <strong></f:verbatim> <t:outputLabel for="data" value="Data"/><f:verbatim> </strong></f:verbatim> <f:verbatim> </td></f:verbatim> 
                    <f:verbatim> <td></f:verbatim>
                    <t:inputCalendar id="data" renderAsPopup="true" renderPopupButtonAsImage="true" popupDateFormat="dd/MM/yyyy" size="10" styleClass="campoTesto" value="#{beanPrimaNotaDb.data}">
                        <f:convertDateTime pattern="dd/MM/yyyy" type="both" timeZone="Europe/Rome"/>
                    </t:inputCalendar>
                    <f:verbatim> <br/></f:verbatim> 
                    <h:message style="color: red" for="data" showDetail="true" showSummary="false" />
                    <f:verbatim> </td>
                </tr></f:verbatim> 

                
                <f:verbatim>
                <tr>
                <td class="etichettaDettaglio"></f:verbatim> <f:verbatim> <strong></f:verbatim> <t:outputLabel for="descrizione" value="Descrizione "/><f:verbatim> </strong></f:verbatim> <f:verbatim> </td></f:verbatim> 
                <f:verbatim><td colspan="4"></f:verbatim> <t:inputText id="descrizione" value="#{beanPrimaNotaDb.descrizione}" styleClass="dettaglio_InputText" size="110" maxlength="400" required="false" immediate="true"/>
                <f:verbatim> <br/></f:verbatim> 
                <h:message style="color: red" for="descrizione" showDetail="true" showSummary="false" />
                <f:verbatim> </td></f:verbatim> 
                <f:verbatim></tr></f:verbatim>     
                
                <f:verbatim><tr>  
                    <td class="etichettaDettaglio"></f:verbatim> <f:verbatim> <strong></f:verbatim> <t:outputLabel for="stampa" value="Stampa"/><f:verbatim> </strong></f:verbatim> <f:verbatim> </td>
                    <td></f:verbatim>
                    <f:verbatim><br/></f:verbatim>
                    <t:selectOneRadio id="stampa" value="#{beanPrimaNotaDb.stampa}" >
                        <f:selectItem itemValue="S" itemLabel="Si"/>
                        <f:selectItem itemValue="N" itemLabel="No"/>                    
                    </t:selectOneRadio>
                    <f:verbatim> </td>
                </tr></f:verbatim>     
                
                <f:verbatim><tr></f:verbatim>                  
                <f:verbatim><td class="etichettaDettaglio"></f:verbatim> <f:verbatim> <strong></f:verbatim> <t:outputLabel for="entCassa" value="Entrata per Cassa"/><f:verbatim> </strong></f:verbatim> <f:verbatim> </td></f:verbatim> 
                <f:verbatim><td></f:verbatim> <t:inputText id="entCassa" value="#{beanPrimaNotaDb.entCassa}" styleClass="dettaglio_InputText" size="6" maxlength="6" required="false"  style="text-align: right" immediate="true">
                    
                </t:inputText>
                <h:message style="color: red" for="entCassa" showDetail="true" showSummary="false" />
                <f:verbatim> </td></f:verbatim> 

                <f:verbatim><td class="etichettaDettaglio"></f:verbatim> <f:verbatim> <strong></f:verbatim> <t:outputLabel for="uscCassa" value="Uscita per Cassa"/><f:verbatim> </strong></f:verbatim> <f:verbatim> </td></f:verbatim> 
                <f:verbatim><td></f:verbatim> <t:inputText id="uscCassa" value="#{beanPrimaNotaDb.uscCassa}" styleClass="dettaglio_InputText" size="6" maxlength="6" required="false"  style="text-align: right" immediate="true">
                    
                </t:inputText>
                <h:message style="color: red" for="uscCassa" showDetail="true" showSummary="false" />
                <f:verbatim> </td></f:verbatim> 
                <f:verbatim> </tr></f:verbatim>                 
                
                <f:verbatim><tr></f:verbatim>                  
                <f:verbatim><td class="etichettaDettaglio"></f:verbatim> <f:verbatim> <strong></f:verbatim> <t:outputLabel for="entBanca" value="Versamento Banca"/><f:verbatim> </strong></f:verbatim> <f:verbatim> </td></f:verbatim> 
                <f:verbatim><td></f:verbatim> <t:inputText id="entBanca" value="#{beanPrimaNotaDb.entBanca}" styleClass="dettaglio_InputText" size="6" maxlength="6" required="false"  style="text-align: right" immediate="true">
                    
                </t:inputText>
                <h:message style="color: red" for="entBanca" showDetail="true" showSummary="false" />
                <f:verbatim> </td></f:verbatim> 

                <f:verbatim><td class="etichettaDettaglio"></f:verbatim> <f:verbatim> <strong></f:verbatim> <t:outputLabel for="uscBanca" value="Prelievo Banca"/><f:verbatim> </strong></f:verbatim> <f:verbatim> </td></f:verbatim> 
                <f:verbatim><td></f:verbatim> <t:inputText id="uscBanca" value="#{beanPrimaNotaDb.uscBanca}" styleClass="dettaglio_InputText" size="6" maxlength="6" required="false"  style="text-align: right" immediate="true">
                    
                </t:inputText>
                <h:message style="color: red" for="uscBanca" showDetail="true" showSummary="false" />
                <f:verbatim> </td></f:verbatim> 
                <f:verbatim> </tr></f:verbatim>                  

                <f:verbatim><tr></f:verbatim>                  
                <f:verbatim><td class="etichettaDettaglio"></f:verbatim> <f:verbatim> <strong></f:verbatim> <t:outputLabel for="entVarie" value="Entrate Varie"/><f:verbatim> </strong></f:verbatim> <f:verbatim> </td></f:verbatim> 
                <f:verbatim><td></f:verbatim> <t:inputText id="entVarie" value="#{beanPrimaNotaDb.entVarie}" styleClass="dettaglio_InputText" size="6" maxlength="6" required="false"  style="text-align: right" immediate="true">
                    
                </t:inputText>
                <h:message style="color: red" for="entVarie" showDetail="true" showSummary="false" />
                <f:verbatim> </td></f:verbatim> 

                <f:verbatim><td class="etichettaDettaglio"></f:verbatim> <f:verbatim> <strong></f:verbatim> <t:outputLabel for="uscVarie" value="Uscite Varie"/><f:verbatim> </strong></f:verbatim> <f:verbatim> </td></f:verbatim> 
                <f:verbatim><td></f:verbatim> <t:inputText id="uscVarie" value="#{beanPrimaNotaDb.uscVarie}" styleClass="dettaglio_InputText" size="6" maxlength="6" required="false"  style="text-align: right" immediate="true">
                    
                </t:inputText>
                <h:message style="color: red" for="uscVarie" showDetail="true" showSummary="false" />
                <f:verbatim> </td></f:verbatim> 
                <f:verbatim> </tr></f:verbatim>              
            </t:panelTab>    
           
        </t:panelTabbedPane>    
        
        
        <f:verbatim><table bgcolor="#FFFFFF" width="750px">
            <tr>     
                <td></f:verbatim>
                <h:commandLink styleClass="commandLink_Style" dir="RTL" action="benvenuto" immediate="true">
                    <t:graphicImage url="/image/go-home.png" border="0"/>
                </h:commandLink>              
                <f:verbatim></td>    
                <td></f:verbatim>
                <t:commandLink action="#{dettaglioPrimaNotaDb.primo}" title="PRIMO" rendered="#{beanPrimaNotaDb.id ne null}">
                    <t:graphicImage url="image/primo.png" border="0" title="Vai al primo elemento"/>
                    <f:param name="bean" value="beanPrimaNotaDb"/>                        
                    <f:param name="id" value="#{beanPrimaNotaDb.id}"/>                 
                </t:commandLink>
                <f:verbatim></td>          
                <td></f:verbatim>
                <t:commandLink action="#{dettaglioPrimaNotaDb.precedente}" title="PRECEDENTE" rendered="#{beanPrimaNotaDb.id ne null}">
                    <t:graphicImage url="image/indietro.png" border="0" title="Indietro"/>
                    <f:param name="bean" value="beanPrimaNotaDb"/>                        
                    <f:param name="id" value="#{beanPrimaNotaDb.id}"/>                 
                </t:commandLink>
                <f:verbatim></td>          
                <td></f:verbatim>
                <t:commandLink action="#{dettaglioPrimaNotaDb.successivo}" title="SUCCESSIVO" rendered="#{beanPrimaNotaDb.id ne null}" >
                    <t:graphicImage url="image/avanti.png" border="0" title="Avanti"/>
                    <f:param name="bean" value="beanPrimaNotaDb"/>                        
                    <f:param name="id" value="#{beanPrimaNotaDb.id}"/>                 
                </t:commandLink>
                <f:verbatim></td>          
                <td></f:verbatim>
                <t:commandLink action="#{dettaglioPrimaNotaDb.ultimo}" title="ULTIMO" rendered="#{beanPrimaNotaDb.id ne null}">
                    <t:graphicImage url="image/ultimo.png" border="0" title="Vai all'ultimo elemento"/>
                    <f:param name="bean" value="beanPrimaNotaDb"/>                        
                    <f:param name="id" value="#{beanPrimaNotaDb.id}"/>                 
                </t:commandLink>
                <f:verbatim></td>
                <td colspan="8"></td>  
                <td></f:verbatim>
                <h:commandLink dir="RTL" title="cancella" action="#{dettaglioPrimaNotaDb.cancella}" rendered="#{beanPrimaNotaDb.id ne null}">
                    <t:graphicImage url="image/stop.png" border="0" title="Cancella"/>
                    <f:param name="bean" value="beanPrimaNotaDb" />
                </h:commandLink>                
                <f:verbatim></td>    
                <td></f:verbatim>
                <h:commandLink dir="RTL" onmousedown="return confirmSave(this);" title="salva inserimento" action="#{dettaglioPrimaNotaDb.inserisci}" rendered="#{beanPrimaNotaDb.id eq null}" >
                    <t:graphicImage url="image/salva.png" border="0" title="Salva inserimento"/>
                    <f:param name="bean" value="beanPrimaNotaDb" />
                </h:commandLink>                
                <f:verbatim></td>          
                <td></f:verbatim>
                <h:commandLink dir="RTL" title="modifica" action="#{dettaglioPrimaNotaDb.modifica}" rendered="#{beanPrimaNotaDb.id ne null}">
                    <t:graphicImage url="image/salva.png" border="0" title="Salva modifiche"/>
                    <f:param name="bean" value="beanPrimaNotaDb" />
                </h:commandLink>                
                <f:verbatim></td>          
                <td></f:verbatim>
                <h:commandLink dir="RTL" title="inserisce nuovo elemento" action="#{dettaglioPrimaNotaDb.inserisciDettaglio}" rendered="#{beanPrimaNotaDb.id ne null}">
                    <t:graphicImage url="image/nuovo.png" border="0" title="Inserisci NUOVO"/>
                    <f:param name="bean" value="beanPrimaNotaDb" />
                </h:commandLink>
                <f:verbatim></td>
                <td></f:verbatim>
                <h:commandLink  title="LISTA" id="lista" action="#{dettaglioPrimaNotaDb.lista}" rendered="#{beanPrimaNotaDb.id ne null}">
                    <t:graphicImage url="image/lista.png" border="0" title="Carica lista" style="width:32px; height:32px"/>
                    <f:param name="bean" value="PrimaNotaDb" />
                </h:commandLink>
                <f:verbatim></td>          
            </tr>
        </table></f:verbatim>
        
     
    </h:form> 
            
    <jsp:include page="/piePagina.jsp"/>      
</f:view>
